package fr.esiea.erg5203.persistence.dao;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import fr.esiea.erg5203.business.Contact;

public abstract class AbstractDAOFactory {

	public abstract DAO<Contact> getContactDAO(); 
	
	public static AbstractDAOFactory getDAOFactory()
	{		
		ApplicationContext appContext = new ClassPathXmlApplicationContext("META-INF/config.xml");			
		
		return appContext.getBean("data-access", AbstractDAOFactory.class);
	}
}
